Repository navigation
OpenConceptLab/ocl_online#654 | Map projects go by their owner's limits and permissions, and the Owner field says which organizations can own one - #147
Conversation
…ts and permissions, and the Owner field says which organizations can own one OpenConceptLab/ocl_online#716 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
…oject may have, with no "Preview" Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
…s count as the person's own; the reason shows by keyboard too, and the usage chip's title says only what it lists Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
|
Codex review, pass 1 (codex-cli 0.171.0, commit 6f38d70): 8 findings (P1 ×8).
Replies (d878017)
One more fix from the review of the private package: until a project is saved, no request can name it, so its matching counts as the person's own. The chip and the AutoMatch dialog now show that. 838 tests pass, ESLint is clean, and I checked the keyboard in a browser. findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "full",
"commit": "6f38d70",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 6633,
"claim": "New organization projects apply personal row limits while the organization lookup is pending.",
"scenario": "A user with a 50-row personal cap selects an organization with a 500-row cap and uploads a 200-row CSV before the capabilities response arrives. The loader only covers saved projects, so the grid and AutoMatch initially use 50 rows. The file reader also captures that personal cap and can show the wrong import notice even if the organization response arrives before parsing finishes.",
"action": "Gate import and row actions on the selected owner's lookup, and resolve the cap when the parsed rows are applied.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.2",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 812,
"claim": "AutoMatch can run a custom algorithm that the organization does not permit.",
"scenario": "A user adds an externally hosted custom algorithm under their personal owner, then switches the draft to an organization whose response omits the custom-algorithm permission. The configuration form flags the algorithm, but AutoMatch still lists it as runnable and can send the spreadsheet rows to its external endpoint.",
"action": "Apply the effective custom-algorithm permission when determining which algorithms can retrieve candidates in bulk and for individual rows.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.3",
"severity": "P1",
"tag": null,
"file": "src/components/common/NamespaceDropdown.jsx",
"line": 100,
"claim": "An organization selected before the availability response can stay selected after the API marks it unavailable.",
"scenario": "A member with organization-project permission selects an organization while the owners request is pending. The response then marks it unavailable because its project quota is full. The field still shows that organization as the selected owner, and Save can submit a request the API rejects.",
"action": "Revalidate the selected owner when availability arrives and prevent creation under a known-unavailable owner through every save entry point.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.4",
"severity": "P1",
"tag": null,
"file": "src/components/common/NamespaceDropdown.jsx",
"line": 49,
"claim": "Arrow-key navigation reaches an unavailable organization without exposing its tooltip or link.",
"scenario": "A keyboard user arrows to an unavailable organization. MUI highlights the option through aria-activedescendant and keeps focus on the input. The Tooltip never opens, leaving the reason visually hidden and the link unavailable to the keyboard.",
"action": "Expose the API's reason when the option is highlighted by keyboard and provide a keyboard-accessible way to follow its link while keeping the option unselectable.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.5",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 6556,
"claim": "The organization-project creation permission can disable Save and close on an existing project.",
"scenario": "A member can edit an existing organization project and has `mapper_org_projects` in their personal permissions, but the organization response omits that creation permission. The form now disables Save and close for an ordinary configuration edit even though the API allows the update.",
"action": "Scope the organization creation check to new projects and use the existing edit authorization for saved projects.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.6",
"severity": "P1",
"tag": null,
"file": "src/common/utils.js",
"line": 298,
"claim": "The AI usage request still checks the personal permission.",
"scenario": "A member has AI Assistant permission on an organization project but lacks it personally. On opening the project with no cached report, the refresh skips the usage request. The usage chip and AutoMatch checkpoints receive no usage report even though the project grants AI access.",
"action": "Use the effective project user to authorize project-specific usage refreshes, including when the organization lookup first grants access.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.7",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProjects.jsx",
"line": 76,
"claim": "The project list keeps using an outdated organization availability response after a project is deleted.",
"scenario": "A member is at their personal project limit, and their only organization is initially full. They delete an organization project from the list, freeing a slot. The delete refresh updates personal capabilities only, so New Project still blocks on the old organization response without asking the API again.",
"action": "Refresh owner availability after a successful deletion and avoid blocking creation on the previous response while that refresh is pending.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.8",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapperQuotaChip.jsx",
"line": 66,
"claim": "The usage chip describes finite organization limits as the user's one-time preview allowance.",
"scenario": "The API returns a finite row cap and recurring match allowance for an organization project. Hovering over the chip labels those values “Your Mapper preview (one-time allowance),” although the API supplied no such description.",
"action": "Use neutral metric labels and display allowance or plan wording only when supplied by the API.",
"lines_delta": null,
"confidence": "high"
}
]
}🤖 Generated with Claude Code |
…, goes by which organizations can own a project, and its notices name no preview Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
|
Codex review, pass 2 (codex-cli 0.171.0, commit d878017): 5 findings (P1 ×5).
Replies (b4d72ab)
838 tests pass, ESLint is clean, and I checked a slow answer and a failed one in a browser. findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "verify",
"commit": "d878017",
"verdict": "findings",
"prior": [
{"id": "F1.1", "status": "unresolved"},
{"id": "F1.2", "status": "resolved"},
{"id": "F1.3", "status": "unresolved"},
{"id": "F1.4", "status": "resolved"},
{"id": "F1.5", "status": "resolved"},
{"id": "F1.6", "status": "resolved"},
{"id": "F1.7", "status": "resolved"},
{"id": "F1.8", "status": "resolved"}
],
"findings": [
{
"id": "F2.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 6636,
"claim": "Draft rows remain interactive under the personal row cap while the selected organization's answer is pending.",
"scenario": "A user whose personal cap is 25 selects row 100 on a draft owned by an organization with a 200-row cap, then changes to another organization with the same cap. While the new request is pending, the grid applies the 25-row cap and drops row 100 from the selection. The upload control also leaves the native file input enabled, so a keyboard user can still open the file picker during the wait.",
"action": "Disable the native file input and pause draft row eligibility, selection pruning, and AutoMatch until the selected owner's request resolves or falls back. Cover both owner changes after upload and keyboard upload in integration tests.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.2",
"severity": "P1",
"tag": null,
"file": "src/components/common/NamespaceDropdown.jsx",
"line": 94,
"claim": "A draft can keep an organization selected after the owners endpoint marks it unavailable.",
"scenario": "A user with the general organization-project permission selects an organization while the owners request is slow. The reply marks that organization unavailable. The option becomes disabled, but it remains the selected owner, and the form checks the general permission instead of that organization's availability. The user can finish the draft and submit it to an owner the API will reject.",
"action": "Distinguish a pending owners request from a failed request. Prevent selection while eligibility is pending, and apply the returned availability to the current draft owner and both Save controls. Preserve the existing choices when the request fails.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.3",
"severity": "P1",
"tag": null,
"file": "src/components/common/useOwnerAccess.js",
"line": 20,
"claim": "A failed request can leave an earlier organization answer active indefinitely.",
"scenario": "A draft receives a 200-row cap for an organization. The user switches to their personal owner and then back. The old organization answer is used immediately. If the fresh request times out, the draft keeps the 200-row cap instead of falling back to the user's personal cap.",
"action": "Invalidate the previous answer when the owner changes, including when switching to a personal owner. Clear a same-owner answer on request failure so the fallback takes effect.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.4",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 6591,
"claim": "Create Similar can deny a user who has an eligible organization while the owners request is pending.",
"scenario": "A user at their personal project limit opens a saved project and chooses Create Similar before the owners request finishes. The action shows the personal limit dialog and never opens the draft, even though the pending response identifies an organization that can own it.",
"action": "Use the project list's pending-request behavior for Create Similar so the new-project page can resolve owner eligibility.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F2.5",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 1694,
"claim": "The upload notice labels organization projects as Preview based solely on the row cap.",
"scenario": "An organization returns a 200-row cap and the user uploads 250 rows. The Mapper says “Preview projects hold 200 rows” even though the API supplied only a row limit.",
"action": "Use plan-neutral upload copy in each locale and display plan wording only when the API supplies it.",
"lines_delta": null,
"confidence": "high"
}
]
}🤖 Generated with Claude Code |
… joined since signing in; a row the new owner's limit leaves out is closed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
|
Codex review, pass 3 (codex-cli 0.171.0, commit b4d72ab): 2 findings (P1 ×2). Of the earlier ones, F1.2, F1.3 and F2.3 stay as answered.
Replies (89b7cd7)
839 tests pass, ESLint is clean, and I checked both in a browser. findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "verify",
"commit": "b4d72ab",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "resolved"
},
{
"id": "F1.2",
"status": "unresolved"
},
{
"id": "F1.3",
"status": "unresolved"
},
{
"id": "F1.4",
"status": "resolved"
},
{
"id": "F1.5",
"status": "resolved"
},
{
"id": "F1.6",
"status": "resolved"
},
{
"id": "F1.7",
"status": "resolved"
},
{
"id": "F1.8",
"status": "resolved"
},
{
"id": "F2.1",
"status": "resolved"
},
{
"id": "F2.2",
"status": "resolved"
},
{
"id": "F2.3",
"status": "unresolved"
},
{
"id": "F2.4",
"status": "resolved"
},
{
"id": "F2.5",
"status": "resolved"
}
],
"findings": [
{
"id": "F3.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 4035,
"claim": "An open row remains editable after an owner change makes it ineligible.",
"scenario": "Open row 50 in a draft owned by an organization with a 100-row cap. Open Settings, switch to a personal owner with a 25-row cap, and close Settings. The grid disables row 50, but its decision pane reopens and still lets the user change its note and mapping decision.",
"action": "Close the decision pane when the resolved owner's cap excludes the open row, and apply the same eligibility check to per-row actions.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F3.2",
"severity": "P1",
"tag": null,
"file": "src/components/common/NamespaceDropdown.jsx",
"line": 92,
"claim": "The Owner field omits organizations returned by the API when they are missing from the cached user profile.",
"scenario": "A user is added to an organization after signing in. The owners endpoint lists it as available, but the dropdown still builds its options from cached memberships. If the user has reached their personal project cap, the form can automatically select that organization, display a blank Owner field, and save the project under the undisplayed owner.",
"action": "Build organization options from the successful owners response. Use cached organization details for labels and icons where available, and use the organization ID when those details are missing.",
"lines_delta": null,
"confidence": "high"
}
]
} |
…ined with the person's own Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
…limit leaves it out is closed too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
|
Simplification review (a fresh Claude subagent, commit 89b7cd7; answered in f591c3b) 6 items, 2 applied: one test of "which organizations are asked about" instead of two, and one helper instead of two in
Codex check of commits b4d72ab..f591c3b (codex-cli 0.171.0): 1 finding (P2).
839 tests pass, and ESLint is clean. findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "final",
"commit": "f591c3b",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "FC.1",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 5880,
"claim": "A queued grid click can reopen a row after the new owner's limit closes it.",
"scenario": "With row 2 open, switch to an owner limited to one row and click row 2 while the access request is pending. If the response arrives during the click's 200 ms delay, the effect closes row 2, then the queued click reopens it using the earlier eligibility check. The effect does not rerun when only the open row changes, so the mapping controls remain usable for the excluded row.",
"action": "Check the latest eligibility when a delayed selection fires. Add a regression test where the owner response arrives between the click and the selection.",
"lines_delta": null,
"confidence": "high"
}
]
} |
…as before Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4
|
One more small commit, c431565: the rows a run includes are worked out from the latest counts when it starts. The branch used the ones from the last render, so a second tab's run could be missed. Codex check of commit 6a8337f..c431565 (codex-cli 0.171.0)
839 tests pass and ESLint is clean. findings.json{
"reviewer": "codex-cli 0.171.0",
"perspective": "defects",
"mode": "final",
"commit": "c431565",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "FC.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 3398,
"claim": "The submit-time quota refresh changes which rows AutoMatch will process without updating the dialog or asking the user to confirm the new scope.",
"scenario": "The dialog shows that all 20 rows are covered. Another tab uses enough match operations to leave only 5 before the user clicks Submit. AutoMatch runs the first 5 without the confirmation normally required for a partial run. If quota renews after the user confirms a 5-row run, the same path can rematch all 20 and clear statuses beyond the confirmed scope.",
"action": "Keep the submit-time quota read. If it changes the runnable row count, refresh the open dialog and require a new submission before modifying any rows.",
"lines_delta": null,
"confidence": "high"
}
]
} |
On an organization's map project, the Mapper uses what the API says its members can use there, instead of the signed-in person's own limits and permissions. When someone creates a map project, the Owner field shows which of their organizations can own it.
What changes
GET /capabilities/orgs/<org>/and goes by itscapabilitiesandpermissions: the rows per project, the custom algorithms, the AI output language, the usage chip and the AutoMatch dialog. The AutoMatch checkpoints (autoMatchCheck.js) get that sameuser.GET /capabilities/mapper.projects/owners/. An organization that can't own the project is listed, with a lock, and can't be chosen. Its tooltip is the reason and link the API sends. Someone who can't create another project of their own starts with an organization that can own one.With an API that doesn't have these routes, the open one included, nothing changes: the person's own limits and permissions apply everywhere, and every organization in the Owner field can be chosen. oclapi2 still decides on every save, so the Mapper only shows what it will answer.
Components: the Owner field is the existing
NamespaceDropdown. The lock is the existingLockMark, and the tooltip is MUI'sTooltip, as elsewhere in the Mapper.Order: stacked on #145. It can go live before or after the API routes.
Checked: ESLint as CI runs it and 837 tests. In a local Mapper at 1440 and 390 pixels wide: the Owner field by mouse, touch and keyboard, an organization's project beside a personal one, the AutoMatch dialog, and an API without the routes.
Refs OpenConceptLab/ocl_online#654 and OpenConceptLab/ocl_online#716, which stay open.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AaZ4qTEw8c6qZh5C69F1V4